]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Honor button mask on touch events
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 21 Jan 2019 19:36:22 +0000 (20:36 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 5 Feb 2019 15:25:54 +0000 (16:25 +0100)
Even though it's not a "button", we use button1 to map to actions. Seems
fair to refuse to press the StButton if it would not react to button1.

src/st/st-button.c

index a95ddff2dc627bfd67de02a411b7b4086d4c48c0..5a70f4e837c31af8b745f211aaed2e933fbe3e01 100644 (file)
@@ -241,6 +241,8 @@ st_button_touch_event (ClutterActor      *actor,
 
   if (priv->pressed != 0)
     return CLUTTER_EVENT_PROPAGATE;
+  if ((priv->button_mask & mask) == 0)
+    return CLUTTER_EVENT_PROPAGATE;
 
   device = clutter_event_get_device ((ClutterEvent*) event);
   sequence = clutter_event_get_event_sequence ((ClutterEvent*) event);